
#ifndef MAINSCENE_H
#define MAINSCENE_H

#include <QWidget>
#include<QTimer>
#include"map.h"
#include"heroplane.h"
#include"bullet.h"
#include"enemyplane.h"
#include"bomb.h"
class MainScene : public QWidget

{
    Q_OBJECT

public:
    MainScene(QWidget *parent = nullptr);
    ~MainScene();
    //初始化场景
    void initScene();
    //启动游戏
    void playGame();
    void updatePosition();
    void paintEvent(QPaintEvent *);
    void mouseMoveEvent(QMouseEvent *);
    //enemy
    void enemyToScene();
    EnemyPlane m_enemys[ENEMY_NUM];
    int m_recorder;
    //碰撞
    void collisionDetection();
    //
    Map m_map;
    HeroPlane m_hero;
//定时器
    QTimer m_Timer;
    //bomb
    Bomb m_bombs[BOMB_NUM];


};

#endif // MAINSCENE_H
